package com.heima.listener;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * @author 霍森彪
 * @date 2022/7/23 10:33
 */

@Component
public class KafkaTest {

    @KafkaListener(topics = "TOPIC-TEST",groupId = "11")
    public void lister(String message){
        System.out.println("这是1111监听的消息"+message);
    }


    @KafkaListener(topics = "TOPIC-TEST",groupId = "22")
    public void lister2(String message){
        System.out.println("这是222监听的消息"+message);
    }

    @KafkaListener(topics = "itcast-topic-out")
    public void lister3(String message){
        System.out.println(""+message);
    }





}
